//
//  BackgroundRefreshPermission.m
//  YuanXinSystemPermissions
//
//  Created by 晏德智 on 2017/2/8.
//  Copyright © 2017年 晏德智. All rights reserved.
//

#import "BackgroundRefreshPermission.h"
#import <UIKit/UIKit.h>
#import "PermissionType.h"

@implementation BackgroundRefreshPermission

+ (NSString *)getStatus
{
    int status = [[UIApplication sharedApplication] backgroundRefreshStatus];
    switch (status) {
        case UIBackgroundRefreshStatusAvailable:
            return RNPStatusAuthorized;
        case UIBackgroundRefreshStatusDenied:
            return RNPStatusDenied;
        case UIBackgroundRefreshStatusRestricted:
            return RNPStatusRestricted;
        default:
            return RNPStatusUndetermined;
    }
}

@end
